<template>
    <view class="app-container">
        <view>
            &nbsp;222222222222222
        </view>
        <!-- 底部导航栏 -->
        <TabBar
                v-if="curPageStyleInfo.showTabBar !== false"
        />
    </view>
</template>

<script setup lang="ts">
    import { ref } from 'vue'
    import {handleGetLocalPic, handleGetPageInfo} from "@/utils/utils";
    import TabBar from '@/components/tabBar/index.vue';
    import handleToast from "@/plugins/model/toast";
    const uToastRef = ref()
    const curVal = ref(0)
    const title = ref('Hello')
    const curPageStyleInfo = ref(handleGetPageInfo().getCurrentStyle())
    console.log(curPageStyleInfo);

    // 处理导航项切换
    // const handleTabChange = (index: number) => {
    //     const item = tabBarItems[index];
    //     if (item && item.pagePath) {
    //         // router.push(item.pagePath);
    //     }
    // };


    const handleChange= (name:number|string)=> {
        return uToastRef.value.open('top')
        //如果去到统计和笔记页面需要判断是否登录
        if (name === 1) return uToastRef.value.show({
            type: 'default',
            title: '默认主题',
            message: "锦瑟无端五十弦",
            iconUrl: 'https://uview-plus.jiangruyi.com/resources/toast/default.png'
        })
        else curVal.value = name
    }

</script>

<style>

</style>
